package com.lzy.cloud.base;

import com.lzy.encrypt.anno.EnableEncrypt;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.Banner;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.context.annotation.Configuration;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;

@EnableFeignClients
@EnableEurekaClient
@EnableCircuitBreaker
@EnableEncrypt
@SpringBootApplication(exclude = {MongoAutoConfiguration.class})
@MapperScan("com.lzy.cloud.base.mapper")
@Configuration
@EnableRedisHttpSession(maxInactiveIntervalInSeconds = 60*30)
public class LzyCloudBaseApplication {

	public static void main(String[] args) {
		new SpringApplicationBuilder(LzyCloudBaseApplication.class).bannerMode(Banner.Mode.LOG)
				.run(args);
	}

}
